Fix thumb_path error by using replace instead of strip

Brightcells 8 years ago
parent
commit
3e0cce7884
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main.py

+ 1 - 1
main.py

@@ -127,7 +127,7 @@ def get_new_files(lensman, session, maxt):
127 127
         if not file_.endswith('.tmp'):  # Whether 'xxx.tmp' or not
128 128
             photo_name = file_.split('/')[-1]
129 129
             photo_id = photo_name.split('.')[0]
130
-            thumb_path = file_.strip(ROOT_PATH)
130
+            thumb_path = file_.replace('{}/'.format(ROOT_PATH), '')
131 131
             origin_path = thumb_path.replace('thumbnail', 'origin')
132 132
             if int(photo_id) > maxt:
133 133
                 insert_session_file(lensman, session, photo_id, photo_name, thumb_path, origin_path)